

import requests
import re
import json
# 网页链接
# https://max.book118.com/html/2016/1207/69517829.shtm
# 接口链接
url = "https://openapi.book118.com/getPreview.html?&project_id=1&aid=69517829&t=aed331cf52b33e7c4ee412e228f4fe8e&view_token=XuKD3KLoNhzFiV1w1H2vmSmhM90TV@63&page=7&filetype=docx&callback=jQuery18307532111886877886_1625746439056&_=1625746455656"

res = requests.get(url)
print(res.text)


data = re.findall('\w+\((.*)\)', res.text)
print(data)
if data:
    print(data[0])
    data = json.loads(data[0])
    print(data)
    href_all = data['data'].values() # 根据字典获取 字典内所有得值
    print(href_all)